package com.ykt.controller;

import java.util.List;

import com.jfinal.aop.Before;
import com.ykt.common.utils.UB;
import com.ykt.service.ServiceService;
import com.ykt.validator.CommonValidator;
import com.ykt.vo.ResultVo;
import com.ykt.vo.ServiceVo;

/**
 * 用户订单操作
 *
 * @author wing
 * @version 1.0.0
 */
public class ServiceController extends BaseController {

    private ServiceService serviceService = enhance(ServiceService.class.getName(), ServiceService.class);

    /**
     * 根据订单ID查询对应的售后
     */
    @Before({CommonValidator.OrderIdValidator.class})
    public void find() {
        int orderId = UB.i(getPara("orderId"));

        List<ServiceVo> serviceVos = serviceService.findByOrderId(orderId);
        
        this.returnJson(ResultVo.success(serviceVos));
    }
}
